<template>
	<!--tab1-->
		<van-tabs v-model="active" class="tab1" @click="onClick">
		<van-tab title='培训课程'></van-tab>
		<van-tab title='线上考试'></van-tab>
		<van-tab title='线下培训'></van-tab>
		<van-tab title='培训记录'></van-tab>
		</van-tabs>
</template>

<script>
	export default {
		name: 'app-tab1',
		data() {
			return {
				active:0
			};
		},
		mounted: function() {
			this.active = this.$route.path.split("/list")[1]
		},
		methods: {
			onClick(index, title){
				this.$router.push({path: '/list'+index});
			}
		}
	};
</script>
